package com.xie.o2o.dao;

import com.xie.o2o.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopDao {
    /**
     * 分页查询店铺，可输入的条件有：店铺名(模糊),店铺状态，店铺类别，区域Id,owner
     *
     * @param shop     查询条件
     * @param rowIndex 从第几行开始取数据
     * @param pageSize 返回的条数
     * @return
     */
    List<Shop> queryShopList(@Param("shop") Shop shop, @Param("rowIndex") int rowIndex,
                             @Param("pageSize") int pageSize);
    //返回queryShopList总数
    int queryShopCount(@Param("shop") Shop shop);

    //新增店铺
    int insertShop(Shop shop);

    //更新店铺
    int updateShop(Shop shop);

    //查询店铺
    Shop queryShop(Long shopId);
}
